import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'ic:baseline-view-in-ar',
      keepAlive: true,
      order: 1000,
      title: '权限管理',
    },
    name: 'Permission',
    path: '/permission',
    children: [
      {
        meta: {
          title: '菜单',
        },
        name: 'Menu',
        path: '/permission/menu',
        component: () => import('#/views/permission/menu/index.vue'),
      },
      {
        meta: {
          title: '角色',
        },
        name: 'Role',
        path: '/permission/role',
        component: () => import('#/views/permission/role/index.vue'),
      },
      {
        meta: {
          title: '管理员',
        },
        name: 'Admin',
        path: '/permission/admin',
        component: () => import('#/views/permission/admin/index.vue'),
      }
    ],
  },
];

export default routes;
